﻿
using System.Collections.Generic;
using System.Linq;

namespace EntityFramework
{
    public class NewsBO : BaseBO
    {
        public static List<News> GetToNewsLastest(int top)
        {

            return db.News.Where(d => d.status == 1).OrderByDescending(d => d.DistributionDate).Take(top).ToList();

        }
    }
}
